package br.org.etec.dotcao.model;

import static javax.persistence.CascadeType.MERGE;
import static javax.persistence.CascadeType.PERSIST;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Table(name="tlocation")
@Entity
public class Location extends AbstractEntity {

	private static final long serialVersionUID = 1L;

	@Column
	private String name;

	@ManyToOne(cascade={PERSIST, MERGE})
	@JoinColumn(name="address")
	private Address address;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Address getAddress() {
		return address;
	}

	public void setAddress(Address address) {
		this.address = address;
	}
}
